export default {
  updataUser(state, data) {
    state.token = data.token;
    state.username = data.acc;
    localStorage.setItem("token", JSON.stringify(state.token));
    localStorage.setItem("username", JSON.stringify(state.username));
  },

  clearUser(state) {
    state.token = "";
    state.username = "";
    localStorage.removeItem("token");
    localStorage.removeItem("username");
  },
};
